﻿#ifndef CHATSERVER_H
#define CHATSERVER_H

#include <QTcpServer>

class ChatServer : public QTcpServer
{
    Q_OBJECT

public:
    ChatServer(QTcpServer *parent = nullptr);
    ~ChatServer()override;

    // 启动服务器
    void StartServer(int port);

    // 处理客户端连接
    void incomingConnection(qintptr socketDescriptor)override;
};

#endif // CHATSERVER_H
